/*
 * CarteiraVacina.java
 *
 * Created on October 12, 2007, 10:46 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package petstore.model;

import petstore.model.enumeration.SituacaoVacinacao;
import java.util.Date;
import javax.persistence.AttributeOverride;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Entity class CarteiraVacina
 * 
 * @author Tom Hayden
 */
@Entity
@Table(name = "carteira_vacina")
@AttributeOverride(name="id", column=@Column(name="nrvacinacao"))
public class CarteiraVacina extends BusinessObject {

    @Column(name = "dtvacinacao")
    @Temporal(TemporalType.TIMESTAMP)
    private Date dataVacinacao;
    
    @Column(name = "dtproxvacinacao")
    @Temporal(TemporalType.TIMESTAMP)
    private Date dataProximaVacinacao;

    @Column(name = "stvacinacao")
    @Enumerated(EnumType.ORDINAL)
    private SituacaoVacinacao situacaoVacinacao;
    
    @Column(name = "txvacinacao")
    private String observacao;

    @ManyToOne
    @JoinColumn(name="cdanimal")
    private Animal animal;
    
    @ManyToOne
    @JoinColumn(name="cdvacina")
    private Vacina vacina;
    
    /** Creates a new instance of CarteiraVacina */
    public CarteiraVacina() {
    }

    public Date getDataVacinacao() {
        return dataVacinacao;
    }

    public void setDataVacinacao(Date dataVacinacao) {
        this.dataVacinacao = dataVacinacao;
    }

    public Date getDataProximaVacinacao() {
        return dataProximaVacinacao;
    }

    public void setDataProximaVacinacao(Date dataProximaVacinacao) {
        this.dataProximaVacinacao = dataProximaVacinacao;
    }

    public SituacaoVacinacao getSituacaoVacinacao() {
        return situacaoVacinacao;
    }

    public void setSituacaoVacinacao(SituacaoVacinacao situacaoVacinacao) {
        this.situacaoVacinacao = situacaoVacinacao;
    }

    public String getObservacao() {
        return observacao;
    }

    public void setObservacao(String observacao) {
        this.observacao = observacao;
    }
    
    public Animal getAnimal() {
        return animal;
    }

    public void setAnimal(Animal animal) {
        this.animal = animal;
    }

    public Vacina getVacina() {
        return vacina;
    }

    public void setVacina(Vacina vacina) {
        this.vacina = vacina;
    }

}
